package day12;

/**
 * @author oldliu
 * @since 1.0
 */
public class CalcTest {
    public static void main(String[] args)   {
        Calc c=new Calc();
        int mul = c.mul(0, 20);
        System.out.println("乘积：："+mul);

        try {
            int s1 =   c.div(0, 12);
            System.out.println("shang ="+s1);
        } catch (Exception e) {
            System.out.println("除法错误");
            e.printStackTrace();
        }
        System.out.println("????????????????");
        try {
            int s2 = c.div(12, 0);
            System.out.println("商是：" + s2);
        }catch (Exception e){
            System.out.println("除法错误");
            e.printStackTrace();
        }
    }
//    public static void main(String[] args) throws Exception {
//        Calc c=new Calc();
//        int s1 = c.div(0, 12);
//        System.out.println("shang ="+s1);
//
//        int s2=c.div(12,0);
//        System.out.println("商是："+s2);
//    }
}
